/*
 * Copyright 2003-2005 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

using System;

namespace argot.util
{
	/// <summary>
	/// ByteArrayCompare.  Created because C# doesn't seem
	/// to have an equivalent to memcmp for Byte[].
	/// </summary>
	/// 
	public class ByteArrayCompare
	{

		public static bool Compare( byte[] a1, byte[] a2 )
		{
			if ( a1.Length != a2.Length )
				return false;

			for ( int x=0; x<a1.Length; x++ )
			{
				if ( a1[x] != a2[x] ) return false;
			}
			return true;
		}

	}
}
